.printer-container {
  min-height: 100vh;
  background: #f5f5f5;
}

.custom-nav {
  background: white;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  
  .nav-content {
    display: flex;
    align-items: center;
    height: 88rpx;
    padding: 0 20rpx;
  }
  
  .nav-back {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rpx 20rpx 10rpx 10rpx;
    margin-right: 10rpx;
    
    &:active {
      opacity: 0.5;
    }
    
    .back-icon {
      width: 48rpx;
      height: 48rpx;
    }
  }
  
  .nav-title {
    flex: 1;
    text-align: center;
    font-size: 36rpx;
    font-weight: 600;
    color: #333;
    line-height: 88rpx;
  }
  
  .nav-placeholder {
    width: 68rpx;
  }
  
  .nav-right {
    width: 68rpx;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    
    .add-text {
      font-size: 28rpx;
      color: #5cb85c;
      font-weight: 500;
    }
  }
}

.main-content {
  padding-top: 180rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.printer-card {
  background: white;
  border-radius: 30rpx;
  padding: 60rpx;
  width: 600rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
  
  .printer-icon-wrapper {
    width: 160rpx;
    height: 160rpx;
    border-radius: 80rpx;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30rpx;
    
    .printer-icon {
      width: 100rpx;
      height: 100rpx;
    }
  }
  
  .printer-name {
    font-size: 32rpx;
    font-weight: 600;
    color: #333;
    margin-bottom: 15rpx;
    text-align: center;
  }
  
  .printer-status {
    font-size: 26rpx;
    
    &.connected {
      color: #5cb85c;
    }
  }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60rpx;
  
  .empty-icon-wrapper {
    width: 160rpx;
    height: 160rpx;
    border-radius: 80rpx;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30rpx;
    
    .empty-icon {
      width: 100rpx;
      height: 100rpx;
      opacity: 0.4;
    }
  }
  
  .empty-text {
    font-size: 28rpx;
    color: #999;
  }
}

.printer-list {
  width: 100%;
  padding: 20rpx;
}

.list-add-wrapper {
  width: 100%;
  padding: 0 40rpx 60rpx;
  display: flex;
  justify-content: center;
}

.printer-item {
  background: white;
  border-radius: 20rpx;
  padding: 30rpx;
  margin-bottom: 20rpx;
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
}

.printer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20rpx;
  
  .printer-info {
    flex: 1;
    
    .printer-name {
      font-size: 32rpx;
      font-weight: 600;
      color: #333;
      display: block;
      margin-bottom: 8rpx;
    }
    
    .printer-brand {
      font-size: 26rpx;
      color: #999;
    }
  }
  
  .printer-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8rpx;
    
    .badge {
      font-size: 22rpx;
      padding: 4rpx 12rpx;
      border-radius: 8rpx;
      
      &.default {
        background: #fff3cd;
        color: #856404;
      }
      
      &.status-0 {
        background: #f5f5f5;
        color: #999;
      }
      
      &.status-1 {
        background: #d4edda;
        color: #155724;
      }
      
      &.status-2 {
        background: #fff3cd;
        color: #856404;
      }
      
      &.online {
        background: #d1ecf1;
        color: #0c5460;
      }
    }
  }
}

.printer-details {
  margin-bottom: 20rpx;
  padding-top: 20rpx;
  border-top: 1rpx solid #f0f0f0;
  
  .detail-row {
    display: flex;
    margin-bottom: 12rpx;
    font-size: 26rpx;
    
    .detail-label {
      color: #999;
      width: 160rpx;
    }
    
    .detail-value {
      color: #333;
      flex: 1;
    }
  }
}

.printer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12rpx;
  padding-top: 20rpx;
  border-top: 1rpx solid #f0f0f0;
  
  .action-btn {
    flex: 1;
    min-width: 120rpx;
    font-size: 26rpx;
    padding: 12rpx 20rpx;
    border-radius: 8rpx;
    background: #f5f5f5;
    color: #333;
    border: none;
    
    &::after {
      border: none;
    }
    
    &.edit {
      background: #e3f2fd;
      color: #1976d2;
    }
    
    &.delete {
      background: #ffebee;
      color: #d32f2f;
    }
  }
}

.add-btn {
  margin-top: 40rpx;
  width: 400rpx;
  background: #5cb85c;
  color: white;
  font-size: 28rpx;
  border-radius: 50rpx;
  padding: 20rpx;
  
  &::after {
    border: none;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40rpx 20rpx;
  z-index: 1000;
}

.modal-content {
  width: 100vw;
  max-width: 640rpx;
  margin: 0 20rpx;
  max-height: calc(80vh - 80rpx);
  background: white;
  border-radius: 20rpx;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0 auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30rpx;
  border-bottom: 1rpx solid #f0f0f0;
  
  .modal-title {
    font-size: 32rpx;
    font-weight: 600;
    color: #333;
  }
  
  .modal-close {
    font-size: 48rpx;
    color: #999;
    line-height: 1;
  }
}

.modal-body {
  flex: 1;
  padding: 30rpx;
  max-height: calc(60vh - 60rpx);
  box-sizing: border-box;
  padding-bottom: 60rpx;
  width: 100%;
  overflow-x: hidden;

  .scroll-spacer {
    height: 60rpx;
    flex-shrink: 0;
    width: 100%;
  }
}

.form-item {
  margin-bottom: 30rpx;
  position: relative;
  width: 100%;
  
  .form-label {
    display: block;
    font-size: 28rpx;
    color: #333;
    margin-bottom: 12rpx;
    width: 100%;
    box-sizing: border-box;
    line-height: 40rpx;
  }
  
  .form-input {
    width: 100%;
    padding: 20rpx;
    background: #f5f5f5;
    border-radius: 8rpx;
    font-size: 28rpx;
    box-sizing: border-box;
    line-height: 40rpx;
    min-height: 80rpx;
  }
  
  .picker-view {
    padding: 20rpx;
    background: #f5f5f5;
    border-radius: 8rpx;
    font-size: 28rpx;
    width: 100%;
    box-sizing: border-box;
    line-height: 40rpx;
    min-height: 80rpx;
  }
}

.modal-footer {
  display: flex;
  padding: 30rpx;
  border-top: 1rpx solid #f0f0f0;
  gap: 20rpx;
  
  .footer-btn {
    flex: 1;
    padding: 24rpx;
    border-radius: 8rpx;
    font-size: 28rpx;
    border: none;
    
    &::after {
      border: none;
    }
    
    &.cancel {
      background: #f5f5f5;
      color: #333;
    }
    
    &.confirm {
      background: #5cb85c;
      color: white;
    }
  }
}
